﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using WebApplication10.App_Code;

namespace WebApplication10
{
    public partial class MasterEmployerRegistration : System.Web.UI.Page
    {
        protected void Button2_Click(object sender, EventArgs e)
        {
            Employer em = new Employer();
            em.Username = UserName.Text;
            em.Password = PassWord.Text;
            em.Name = Name.Text;
            em.EmployerContact = Convert.ToInt32(Contact.Text);
            em.EmployerEmail = Email.Text;
            em.Address = Address.Text;
            em.CompanyName = CompanyName.Text;
            em.JobPosition = JobPosition.Text;
            em.CompanyEmail = EmailAddress.Text;

            int newEmployerID = Employer.InsertEmployer(em);
            Employer.InsertEmployer(em);

            Response.Redirect("~/SuccessfulRegistration.aspx");

        }

        protected void Button1_Click(object sender, EventArgs e)
        {
            Response.Redirect("~/HomePage.aspx");
        }

        protected void Page_Load(object sender, EventArgs e)
        {
            
        }

       
    }
}